<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>班次查询</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/realsche/list">预定线路</a></li>
	</ul>
	<form:form id="searchForm" action="${ctx}/realsche/list" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li>
				<span><label>发车日期：</label></span>
				<input type="text" name="departdateStr" maxlength="20" readonly class="input-mini Wdate"
					value="${realsche.departdateStr }"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,minDate:'${today}'});"/>
			</li>
			<li>
				<span><label>&nbsp;&nbsp;出发站：</label></span>
				<select name="boardaddr" class="input-small">
				<option value="">请选择</option>
				<c:forEach items="${siteList }" var="site">
				<option value="${site.sitename }" <c:if test="${realsche.boardaddr == site.sitename}">selected</c:if>>${site.sitename }</option>
				</c:forEach>
				</select>
			</li>
			<li>
				<span><label>&nbsp;&nbsp;目的站：</label></span>
				<select name="offaddr" class="input-small">
				<option value="">请选择</option>
				<c:forEach items="${siteList }" var="site">
				<option value="${site.sitename }" <c:if test="${realsche.offaddr == site.sitename}">selected</c:if>>${site.sitename }</option>
				</c:forEach>
				</select>
			</li>
			<li class="btns"><input class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table class="table table-striped table-bordered table-condensed">
		<thead>
			<tr class="success">
				<th>班次名称</th>
				<th>发车日期</th>
				<th>发车时间</th>
				<th>零售票价</th>
				<th>结算票价</th>
				<th>上客点</th>
				<th>下客点</th>
				<th>总座位数</th>
				<th>可售座位数</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.list}" var="realsche">
			<tr>
				<td>${realsche.schename}</td>
				<td>${realsche.departdateStr }</td>
				<td>${realsche.boardtime }</td>
				<td>${realsche.retailprice}</td>
				<td>${realsche.settleprice}</td>
				<td>${realsche.boardaddr}</td>
				<td>${realsche.offaddr}</td>
				<td>${realsche.totalseats}</td>
				<td>${realsche.leftSeats}</td>
				<td><a href="${ctx}/realsche/details?realscheid=${realsche.realscheid}&realboardid=${realsche.realboardid}&realoffid=${realsche.realoffid}&departdateStr=${realsche.departdateStr }">预定</a></td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>